Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): don't prerender index.html with a server #7831

Merged
merged 6 commits into from
Oct 3, 2022
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves nuxt/nuxt#15016

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

We should not be prerendering index.html if there is a dynamic server as runtime config (or nitro plugins) may change the response.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Sep 26, 2022
@danielroe danielroe requested a review from pi0 September 26, 2022 11:02
@danielroe danielroe self-assigned this Sep 26, 2022
@codesandbox
Copy link

codesandbox bot commented Sep 26, 2022

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@netlify
Copy link

netlify bot commented Sep 26, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 83812d0
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/633aeb46ba9fd40009651aba

@LastxTemplar
Copy link

I would just like to say that this is not a minor bug, it's an app breaking bug. We have the ssr flag set to false but it still generates the index page and our runtime env values are not available in there. This breaks the app especially if you have middleware using a service like auth0. Can this please be merge as soon as possible? or at least provide a workaround to forcefully not generate the index page.
Thank you!

@manniL
Copy link
Member

manniL commented Sep 27, 2022

@LastxTemplar see nuxt/nuxt#15016 for a workaround.

@LastxTemplar
Copy link

@LastxTemplar see nuxt/nuxt#15016 for a workaround.

Thank you!

Copy link
Member Author

I would also add that when I mark something p3 vs p4 it doesn't mean it will get less attention. For me, it's:

(num people affected) x (severity of the issue) - (possibility of workaround)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public runtimeConfig not working on index page
4 participants